import Cookies from "js-cookie";

const TokenKey = "cdj_fenjian";
export function getToken() {
	return Cookies.get(TokenKey);
}

export function setToken(token, date) {
	if (date) {
		return Cookies.set(TokenKey, token, { expires: 15 });
	} else {
		return Cookies.set(TokenKey, token);
	}
}

export function removeToken() {
	return Cookies.remove(TokenKey);
}
